package com.rtwo.tio.client.handler;

import com.rtwo.tio.common.BasicHandler;
import com.rtwo.tio.server.msg.JoinGroupResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tio.core.ChannelContext;

import java.io.UnsupportedEncodingException;

/**
 * Created by hasee on 2018/7/20.
 */
public class JoinGroupRequestHandler extends BasicHandler<JoinGroupResponse>{

    private static Logger logger = LoggerFactory.getLogger(JoinGroupRequestHandler.class);

    @Override
    public Class<JoinGroupResponse> getClazz() {
        return JoinGroupResponse.class;
    }

    @Override
    public void postHanlder(JoinGroupResponse body, ChannelContext channelContext) throws UnsupportedEncodingException {
        logger.error("顺利加入group:"+body.getIsJoin());
    }
}
